<?php

namespace App\Services\ResetUserPassword;

use App\Models\User;

class ResetUserPassword
{
	/**
	 * @var User
	 */
	protected $user;
	
	protected $password;
	
	public function __construct(User $user, string $password)
	{
		$this->user = $user;
		$this->password = $password;
	}
	
	public function reset()
	{
		$this->user->update([
			'password' => bcrypt($this->password)
		]);
	}
}
